/* photo viewer div */
.photoviewer {
    position: relative;
    flex-shrink: 0;
    margin-bottom: 10px;
    width: 330px;
    height: 250px;
    padding: 5px;
    background-color: #fff;
}
.ideditor[dir='ltr'] .photoviewer {
    margin-left: 10px;
    margin-right: 2px;
}
.ideditor[dir='rtl'] .photoviewer {
    margin-right: 10px;
    margin-left: 2px;
}

@media screen and (min-width: 1600px) {
    .photoviewer {
        width: 490px;
        height: 370px;
    }
}

.photoviewer button.thumb-hide {
    border-radius: 0;
    padding: 5px;
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 50;
}

.photoviewer button.resize-handle-xy {
    border-radius: 0;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 49;
    cursor: nesw-resize;
    height: 25px;
    width: 25px;
}

.photoviewer button.resize-handle-x {
    border-radius: 0;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 48;
    cursor: ew-resize;
    height: auto;
    width: 6px;
}

.photoviewer button.resize-handle-y {
    border-radius: 0;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 48;
    cursor: ns-resize;
    height: 6px;
    width: 100%;
}


.photo-wrapper,
.photo-wrapper img {
    width: 100%;
    height: 100%;
    overflow: hidden;
    object-fit: cover;
}

.photo-wrapper .photo-attribution {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    font-size: 10px;
    text-align: right;
    line-height: 1.1em;
    padding: 4px 2px;
    z-index: 10;
}

.photo-attribution a,
.photo-attribution a:visited,
.photo-attribution span {
    padding: 4px 2px;
    color: #fff;
}

/* markers and sequences */
.viewfield-group {
    pointer-events: none;
}
.ideditor.mode-browse .viewfield-group,
.ideditor.mode-select .viewfield-group,
.ideditor.mode-select-data .viewfield-group,
.ideditor.mode-select-error .viewfield-group,
.ideditor.mode-select-note .viewfield-group {
    pointer-events: visible;
    cursor: pointer;
}

.viewfield-group.currentView * {
    fill: #ffee00 !important;
}
.viewfield-group.hovered * {
    fill: #eebb00 !important;
}

.viewfield-group circle {
    stroke: #555;
    stroke-width: 1;
    stroke-opacity: 0.4;
    fill-opacity: 0.4;
}
.viewfield-group.highlighted circle {
    stroke: #222;
    stroke-opacity: 0.9;
    fill-opacity: 0.9;
}
.viewfield-group.highlighted.hovered circle {
    stroke: #222;
    stroke-width: 2;
    stroke-opacity: 0.9;
    fill-opacity: 0.9;
}
.viewfield-group.highlighted.currentView circle {
    stroke: #222;
    stroke-width: 2;
    stroke-opacity: 1;
    fill-opacity: 1;
}

.viewfield-group .viewfield {
    stroke-width: 0;
    stroke: #222;
    fill-opacity: 0.4;
}
.viewfield-group.highlighted .viewfield {
    stroke-width: 1;
    fill-opacity: 0.8;
}
.viewfield-group.highlighted.hovered .viewfield {
    stroke-width: 1;
    fill-opacity: 0.8;
}
.viewfield-group.highlighted.currentView .viewfield {
    stroke-width: 1;
    fill-opacity: 0.9;
}

.viewfield-group.currentView .viewfield-scale {
    transform: scale(2,2);
}

.sequence {
    fill: none;
    stroke-width: 2;
    stroke-opacity: 0.4;
}
.sequence.highlighted,
.sequence.currentView {
    stroke-width: 4;
    stroke-opacity: 1;
}


/* Streetside Image Layer */
.layer-streetside-images {
    pointer-events: none;
}
.layer-streetside-images .viewfield-group * {
    fill: #0fffc4;
}
.layer-streetside-images .sequence {
    stroke: #0fffc4;
    stroke-opacity: 0.85;  /* bump opacity - only one per road */
}


/* Mapillary Image Layer */
.layer-mapillary {
    pointer-events: none;
}
.layer-mapillary .viewfield-group * {
    fill: #55ff22;
}
.layer-mapillary .sequence {
    stroke: #55ff22;
}


/* Mapillary Traffic Signs and Map Features Layers */
.layer-mapillary-detections {
    pointer-events: none;
}
.layer-mapillary-detections .icon-detected {
    outline: 2px solid transparent;
    pointer-events: visible;
    cursor: pointer;
    opacity: 0.75;
}
.layer-mapillary-detections .icon-detected rect {
    fill: none;
}
.layer-mapillary-detections .icon-detected:active {
    opacity: 1;
}
.layer-mapillary-detections .icon-detected:active rect {
    outline: 3px solid rgba(255, 238, 0, 0.6);
}
@media (hover: hover) {
    .layer-mapillary-detections .icon-detected:hover {
        opacity: 1;
    }
    .layer-mapillary-detections .icon-detected:hover rect {
        outline: 3px solid rgba(255, 238, 0, 0.6);
    }
}
.layer-mapillary-detections .icon-detected.currentView {
    opacity: 1;
}
.layer-mapillary-detections .icon-detected.currentView rect {
    outline: 3px solid rgba(255, 238, 0, 1);
}


/* OpenStreetCam Image Layer */
.layer-openstreetcam {
    pointer-events: none;
}
.layer-openstreetcam .viewfield-group * {
    fill: #20c4ff;
}
.layer-openstreetcam .sequence {
    stroke: #20c4ff;
}


/* Streetside Viewer (pannellum) */
.ms-wrapper .photo-attribution .image-link {
    display: block;
}
.ms-wrapper .photo-attribution .attribution-row {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}
.ms-wrapper .photo-attribution .image-view-link {
    text-align: left;
    margin: 0 5px;
}
.ms-wrapper .photo-attribution .image-report-link {
    text-align: right;
}

.ms-wrapper .photo-attribution a:active {
    color: #0fffc4;
}
@media (hover: hover) {
    .ms-wrapper .photo-attribution a:hover {
        color: #0fffc4;
    }
}

.ms-wrapper .pnlm-compass.pnlm-control {
    width: 26px;
    height: 26px;
    left: 4px;
    top: 60px;
    background-size: contain;
    background-repeat: no-repeat no-repeat;
}

label.streetside-hires {
    cursor: pointer;
}
.streetside-hires span {
    margin-top: 2px;
}
.streetside-hires input[type="checkbox"] {
    float: left;
    width: 12px;
    height: 12px;
    margin: 0 5px;
}


/* Mapillary viewer */
#ideditor-mly .domRenderer .TagSymbol {
    font-size: 10px;
    background-color: rgba(0,0,0,0.4);
    padding: 0 4px;
    border-radius: 4px;
    top: -25px;
}

.mly-wrapper .AttributionContainer .AttributionIconContainer .AttributionMapillaryLogo {
    margin-top: 3px;
}

.mly-wrapper .AttributionContainer .AttributionImageContainer {
    color: #fff;
    font-size: 10px;
    font-weight: 300;
    overflow: hidden;
}


/* OpenStreetCam viewer */
.osc-wrapper {
    position: relative;
    background-color: #000;
    background-image: url(img/loader-black.gif);
    background-position: center;
    background-repeat: no-repeat;
}

.osc-wrapper .photo-attribution a:active {
    color: #20c4ff;
}
@media (hover: hover) {
    .osc-wrapper .photo-attribution a:hover {
        color: #20c4ff;
    }
}

.osc-image-wrap {
    width: 100%;
    height: 100%;
    transform-origin:0 0;
}


/* photo-controls (step forward, back, rotate) */
.photo-controls-wrap {
    text-align: center;
    position: absolute;
    top: 10px;
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.photo-controls {
    display: inline-block;
    z-index: 10;
    pointer-events: initial;
}

.photo-controls button,
.photo-controls button:focus {
    height: 18px;
    width: 18px;
    background: rgba(0,0,0,0.65);
    color: #eee;
    border-radius: 0;
}
.photo-controls button:first-of-type {
    border-radius: 3px 0 0 3px;
}
.photo-controls button:last-of-type {
    border-radius: 0 3px 3px 0;
}
.photo-controls button:active {
    background: rgba(0,0,0,0.85);
    color: #fff;
}
@media (hover: hover) {
    .photo-controls button:hover {
        background: rgba(0,0,0,0.85);
        color: #fff;
    }
}
